<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FightDetail.aspx.cs" Inherits="FightDetail" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    &nbsp;<br />
    <asp:GridView ID="GridView_RaidSummaryMeters" runat="server" AllowSorting="True"
        AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid"
        BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource_RaidMeters" ForeColor="Black"
        GridLines="Vertical">
        <FooterStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:BoundField DataField="Subject" HeaderText="Subject" SortExpression="Subject">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="TimeInCombat" DataFormatString="{0:#.}" HeaderText="TimeInCombat"
                HtmlEncode="False" ReadOnly="True" SortExpression="TimeInCombat">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="DamageOut" DataFormatString="{0:#.}" HeaderText="DamageOut"
                HtmlEncode="False" ReadOnly="True" SortExpression="DamageOut">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="DPS" DataFormatString="{0:#.00}" HeaderText="DPS" HtmlEncode="False"
                ReadOnly="True" SortExpression="DPS">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="DamageIn" DataFormatString="{0:#.}" HeaderText="DamageIn"
                HtmlEncode="False" ReadOnly="True" SortExpression="DamageIn">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="HealingOut" DataFormatString="{0:#.}" HeaderText="HealingOut"
                HtmlEncode="False" ReadOnly="True" SortExpression="HealingOut">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="HPS" DataFormatString="{0:#.00}" HeaderText="HPS" HtmlEncode="False"
                ReadOnly="True" SortExpression="HPS">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="HealingIn" DataFormatString="{0:#.}" HeaderText="HealingIn"
                HtmlEncode="False" ReadOnly="True" SortExpression="HealingIn">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
        </Columns>
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#CCCCCC" />
    </asp:GridView>
    <br />
    <br />
    <asp:SqlDataSource ID="SqlDataSource_RaidMeters" runat="server" ConnectionString="<%$ ConnectionStrings:RaidLog.Engine.Properties.Settings.RaidLogConnectionString %>" ProviderName="<%$ ConnectionStrings:RaidLog.Engine.Properties.Settings.RaidLogConnectionString.ProviderName %>"
        SelectCommand="with TimeInCombat(SubjectID, TimeInCombat) as (&#13;&#10;&#9;select SubjectID, Sum([Value]) TimeInCombat &#13;&#10;&#9;from faaMeter2d&#13;&#10;&#9;where faaMeter2d.FightID = @FightID and MeterTypeID = 3&#13;&#10;&#9;group by SubjectID&#13;&#10;), DamageOut(SubjectID, DamageOut) as (&#13;&#10;&#9;select SubjectID, Sum([Value]) DamageOut &#13;&#10;&#9;from faaMeter4d&#13;&#10;&#9;where faaMeter4d.FightID = @FightID and MeterTypeID = 1&#13;&#10;&#9;group by SubjectID&#13;&#10;), DamageIn(SubjectID, DamageIn) as (&#13;&#10;&#9;select TargetID as SubjectID, Sum([Value]) DamageIn &#13;&#10;&#9;from faaMeter4d&#13;&#10;&#9;where faaMeter4d.FightID = @FightID and MeterTypeID = 1&#13;&#10;&#9;group by TargetID&#13;&#10;), HealingOut(SubjectID, HealingOut) as (&#13;&#10;&#9;select SubjectID, Sum([Value]) HealingOut &#13;&#10;&#9;from faaMeter4d&#13;&#10;&#9;where faaMeter4d.FightID = @FightID and MeterTypeID = 2&#13;&#10;&#9;group by SubjectID&#13;&#10;), HealingIn(SubjectID, HealingIn) as (&#13;&#10;&#9;select TargetID as SubjectID, Sum([Value]) HealingIn &#13;&#10;&#9;from faaMeter4d&#13;&#10;&#9;where faaMeter4d.FightID = @FightID and MeterTypeID = 2&#13;&#10;&#9;group by TargetID&#13;&#10;) select &#13;&#10;&#9;&#9;mtNoun.PublicText Subject, &#13;&#10;&#9;&#9;TimeInCombat.TimeInCombat,&#13;&#10;&#9;&#9;DamageOut.DamageOut,&#13;&#10;&#9;&#9;DamageOut.DamageOut/TimeInCombat.TimeInCombat DPS,&#13;&#10;&#9;&#9;DamageIn.DamageIn,&#13;&#10;&#9;&#9;HealingOut.HealingOut,&#13;&#10;&#9;&#9;HealingOut.HealingOut/TimeInCombat.TimeInCombat HPS,&#13;&#10;&#9;&#9;HealingIn.HealingIn&#13;&#10;&#9;from mtNoun&#13;&#10;&#9;full outer join TimeInCombat on TimeInCombat.SubjectID = mtNoun.NounID&#13;&#10;&#9;full outer join DamageOut on DamageOut.SubjectID = mtNoun.NounID&#13;&#10;&#9;full outer join DamageIn on DamageIn.SubjectID = mtNoun.NounID&#13;&#10;&#9;full outer join HealingOut on HealingOut.SubjectID = mtNoun.NounID&#13;&#10;&#9;full outer join HealingIn on HealingIn.SubjectID = mtNoun.NounID&#13;&#10;where mtNoun.PublicText is not null and TimeInCombat.TimeInCombat is not null&#13;&#10;">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="FightID" QueryStringField="FightID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

